#ZERO_A
MG "...Axis A, 25mm beamtrap is being zero-ed"{EA}
A_BUSY=1;
FLA=48000000;BLA=-48000000
ACA=100000;DCA=100000;SPA=25000
MG "...test, if already on -LIMIT, back off, head for it again"{EA}
IF(_TSA&$04=$00);PRA=50000;BGA;MCA;ENDIF
PRA=-20000000;BGA;
MG "...driving to negative limit switch"{EA}
#LPA1;
JP #LPA1,(_TSA&$04=$04);
MCA
MG "...Negative limit tripped, drive forward to clear"{EA}
ACA=100000;DCA=100000;SPA=5000
PRA=5000000;
BGA
#LPA2;
JP #LPA2,(_TSA&$04=$00)
MG "...Negative limit cleared, define zero here"{EA}
STA;MCA;DPA=0;
MG "... ZERO DEFINED"{EA}
MG "...Zeroing complete!"{EA};A_BUSY=0;EN
#ZERO_B
MG "...Axis B, 50mm beamtrap is being zero-ed"{EA}
B_BUSY=1;
FLB=48000000;BLB=-48000000
ACB=100000;DCB=100000;SPB=25000
MG "...test, if already on -LIMIT, back off, head for it again"{EA}
IF(_TSB&$04=$00);PRB=50000;BGB;MCB;ENDIF
PRB=-20000000;BGB;
MG "...driving to negative limit switch"{EA}
#LPB1;
JP #LPB1,(_TSB&$04=$04);
MCB
MG "...Negative limit tripped, drive forward to clear"{EA}
ACB=100000;DCB=100000;SPB=5000
PRB=5000000;
BGB
#LPB2;
JP #LPB2,(_TSB&$04=$00)
MG "...Negative limit cleared, define zero here"{EA}
STB;MCB;DPB=0;
MG "... ZERO DEFINED"{EA}
MG "...Zeroing complete!"{EA};B_BUSY=0;EN
#ZERO_C
MG "...Axis C, 76mm beamtrap is being zero-ed"{EA}
C_BUSY=1;
FLC=48000000;BLC=-48000000
ACC=100000;DCC=100000;SPC=25000
MG "...test, if already on -LIMIT, back off, head for it again"{EA}
IF(_TSC&$04=$00);PRC=50000;BGC;MCC;ENDIF
PRC=-20000000;BGC;
MG "...driving to negative limit switch"{EA}
#LPC1;
JP #LPC1,(_TSC&$04=$04);
MCC
MG "...Negative limit tripped, drive forward to clear"{EA}
ACC=100000;DCC=100000;SPC=5000
PRC=5000000;
BGC
#LPC2;
JP #LPC2,(_TSC&$04=$00)
MG "...Negative limit cleared, define zero here"{EA}
STC;MCC;DPC=0;
MG "... ZERO DEFINED"{EA}
MG "...Zeroing complete!"{EA};C_BUSY=0;EN
#ZERO_D
MG "...Axis D, 101mm beamtrap is being zero-ed"{EA}
D_BUSY=1;
FLD=48000000;BLD=-48000000
ACD=100000;DCD=100000;SPD=25000
MG "...test, if already on -LIMIT, back off, head for it again"{EA}
IF(_TSD&$04=$00);PRD=50000;BGD;MCD;ENDIF
PRD=-20000000;BGD;
MG "...driving to negative limit switch"{EA}
#LPD1;
JP #LPD1,(_TSD&$04=$04);
MCD
MG "...Negative limit tripped, drive forward to clear"{EA}
ACD=100000;DCD=100000;SPD=5000
PRD=5000000;
BGD
#LPD2;
JP #LPD2,(_TSD&$04=$00)
MG "...Negative limit cleared, define zero here"{EA}
STD;MCD;DPD=0;
MG "... ZERO DEFINED"{EA}
MG "...Zeroing complete!"{EA};D_BUSY=0;EN
#ZERO_E
MG "...Axis E, beamtrap X translation is being zero-ed"{EA}
E_BUSY=1;
FLE=48000000;BLE=-48000000
ACE=100000;DCE=100000;SPE=25000
MG "...test, if already on -LIMIT, back off, head for it again"{EA}
IF(_TSE&$04=$00);PRE=100000;BGE;MCE;ENDIF
PRE=-20000000;BGE;
MG "...driving to negative limit switch"{EA}
#LPE1;
JP #LPE1,(_TSE&$04=$04);
MCE
MG "...Negative limit tripped, drive forward to clear"{EA}
ACE=100000;DCE=100000;SPE=5000
PRE=5000000;
BGE
#LPE2;
JP #LPE2,(_TSE&$04=$00)
MG "...Negative limit cleared, define zero here"{EA}
STE;MCE;DPE=0;
MG "... ZERO DEFINED"{EA}
MG "...Zeroing complete!"{EA};E_BUSY=0;EN
#ZERO_F
MG "...Axis F, Detector long axis, traverse, is being zero-ed"{EA}
F_BUSY=1;
FLF=48000000;BLF=-48000000
ACF=400000;DCF=400000;SPF=50000
MG "...test, if already on -LIMIT, back off, head for it again"{EA}
IF(_TSF&$04=$00);PRF=500000;BGF;MCF;ENDIF
PRF=-20000000;BGF;
MG "...driving to negative limit switch"{EA}
#LPF1;
JP #LPF1,(_TSF&$04=$04);
MCF
MG "...Negative limit tripped, drive forward to clear"{EA}
ACF=50000;DCF=50000;SPF=10000
PRF=5000000;
BGF
#LPF2;
JP #LPF2,(_TSF&$04=$00)
MG "...Negative limit cleared, define zero here"{EA}
STF;MCF;DPF=0;
ACF=400000;DCF=400000;SPF=50000
MG "... ZERO DEFINED"{EA}
MG "...Zeroing complete!"{EA};F_BUSY=0;EN
#ZERO_G
MG "...Axis G, Detector cross axis, transverse, is being zero-ed"{EA}
G_BUSY=1;
FLG=48000000;BLG=-48000000
ACG=200000;DCG=200000;SPG=100000
MG "...test, if already on -LIMIT, back off, head for it again"{EA}
IF(_TSG&$04=$00);PRG=250000;BGG;MCG;ENDIF
PRG=-20000000;BGG;
MG "...driving to negative limit switch"{EA}
#LPG1;
JP #LPG1,(_TSG&$04=$04);
MCG
MG "...Negative limit tripped, drive forward to clear"{EA}
ACG=50000;DCG=50000;SPG=10000
PRG=5000000;
BGG
#LPG2;
JP #LPG2,(_TSG&$04=$00)
MG "...Negative limit cleared, define zero here"{EA}
STG;MCG;DPG=0;
MG "... ZERO DEFINED"{EA}
MG "...Zeroing complete!"{EA};G_BUSY=0;EN